<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="liYunLong">你真是个天才！</div>
    <script>
        var lyl=document.querySelector("#liYunLong")
        class fn{
            constructor(setColor,setFontSize,content){
                this.setColor=setColor
                this.setFontSize=setFontSize
                this.content=content
            }
            fn1(){
                lyl.style.color=this.setColor
                alert(this.setColor);
                return this
            }
            fn2(){
                lyl.style.fontSize=this.setFontSize
                alert(this.setFontSize);
                return this
            }
            fn3(){
                lyl.innerHTML=this.content
                alert(this.content);
                return this
            }
        }
        lyl.onclick=function(){
             f.fn1().fn2().fn3()
        }
        
        var f=new fn('red','30px','你呀，总能给我整点儿花样')
       
    </script>
</body>
</html>